*Wellman___APSR___Appendix
*July 17, 2020

***********************************
*This File creates results from Appendix Tables (A2.1, A3.1, A4.1, A4.2, A4.3, and A4.4)
***********************************

* Set the working directory to the main folder with the data files

*********
*Table A2.1: Descriptive Statistics*
*********

use Wellman_APSR_full_working.dta, clear

eststo clear
estpost sum Polity2 TaxGDPlag2 TaxGDPlag2ln2020 DiasPop2020 DiasPoplagln2020 EMBcapacity2020 RemitPctGDPlag RemitPctGDPlagln
esttab using TableA2.1July17.tex, cell("mean(fmt(%9.2f)) sd(fmt(%9.2f)) min max") nonumber replace 

tab Polls
tab ID_access, mi
tab Dias_Support
tab Ext_voting
tab frenchpor
tab Rec_Near_Imp
tab pr
tab yeardem

******
*Table A3.1: Transparency Index*
******
clear
use Wellman_APSR_full_working.dta
keep country year types execme Ext_voting Dias_Support Polls ID_access //evrr2
replace types = "Legislative" if types == "Legislative/Parliamentary"
texsave country year types execme Ext_voting Dias_Support Polls ID_access using WellmanAPSR_A3July17.tex, replace 

*****
*Table A4.1: All Elections Model*
*****
clear
use Wellman_APSR_full_working.dta

reg Polls Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020, cluster(stateid)
reg Polls Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, cluster(stateid)
reg Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, cluster(stateid)
reg ID_access i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, cluster(stateid)


*****
*Table A4.2: Fixed Effects Model*
*****

clear 
use Wellman_APSR_reduced_working.dta
xtset ccode year
*frenchpor omitted because of collinearity*

xtreg Polls Dias_Support Polity2 TaxGDPlag2ln2020 DiasPoplagln2020, fe
xtreg Polls Dias_Support Polity2 TaxGDPlag2ln2020 DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, fe
xtreg Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, fe
xtreg ID_access i.Dias_Support Polity2 TaxGDPlag2ln2020 DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, fe

*****
*Table A4.3: Ordered Logistic Regression Model*
*****
clear 
use Wellman_APSR_reduced_working.dta
xtset ccode year

xtologit Polls Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020
xtologit Polls Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020
xtologit Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020
xtologit ID_access i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020

*****
*Table A4.4: Model with additional controls*
*****
clear 
use Wellman_APSR_reduced_working.dta
xtset ccode year

xtreg Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020, cluster(stateid)
xtreg Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020 pr, cluster(stateid)
xtreg Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020 RemitPctGDPlagln, cluster(stateid)
xtreg Polls i.Dias_Support Polity2 TaxGDPlag2ln2020 frenchpor DiasPoplagln2020 Rec_Near_Imp EMBcapacity2020 yeardem, cluster(stateid)


